<style>
    .form-horizontal .form-group{
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
</style>
<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">商品名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="title" name="row[title]" value="" data-rule="required;title" />
        </div>
    </div>
    <div class="form-group">
        <label for="subtitle" class="control-label col-xs-12 col-sm-2">商品副标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="subtitle" name="row[subtitle]" value="" data-rule="" />
        </div>
    </div>
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">商品类型:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', ['1'=>'书籍', '2'=>'产品'])}
        </div>
    </div>
    <div class="form-group">
        <label for="c-pimages" class="control-label col-xs-12 col-sm-2">商品主图:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-pimages" data-rule="" class="form-control" size="50" name="details[images_url]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="plupload-pimages" data-url="" class="btn btn-danger plupload" data-input-id="c-pimages" data-oss-id="alyoss"
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-pimages">
                            <i class="fa fa-upload"></i> 上传
                        </button>
                    </span>
                </div>
            </div>
            <span class="msg-box n-right" for="c-pimages"></span>
            <ul class="row list-inline plupload-preview" id="p-pimages"></ul>
        </div>
    </div>

    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">销售价格:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="row[price]" value=""  />
        </div>
    </div>
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">优惠价格:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="row[discountsprice]" value=""  />
        </div>
    </div>
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">市场价:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="row[market_price]" value=""/>
        </div>
    </div>
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">商品销量:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="form-control" name="row[sales]" value="" />
        </div>
    </div>
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">商品库存:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="row[stock]" value="200" />
        </div>
    </div>
    <div class="form-group" style="margin-bottom: unset">
        <label class="control-label col-xs-12 col-sm-2">口味:</label>
        <div id="prev" style="padding-left: 18%">
            <div id="skuattr" class="form-group">
                <input name="rowsku[skuid][]" value="0" style="display: none">
                <div class="col-xs-12 col-sm-5">
                    <input type="text" class="form-control" size="60" name="rowsku[skutitle][]" value="" placeholder="口味名称"/>
                </div>
                <div class="col-xs-12 col-sm-2">
                    <input type="text" class="form-control" name="rowsku[skuprice][]" value="" placeholder="价格" />
                </div>
                <div class="col-xs-12 col-sm-2">
                    <input type="number" class="form-control" name="rowsku[skustock][]" value="" placeholder="库存" />
                </div>
                <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
            </div>
        </div>
    </div>

    <div class="form-group" style="text-align: center">
        <a href="javascript:;" id="append" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
    </div>

    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">商品详情</label>
    </div>
    <div class="form-group">
        <label for="c-picdesc" class="control-label col-xs-12 col-sm-2">商品详情图:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-picdesc" data-rule="" class="form-control" size="50" name="details[picdesc]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="plupload-picdesc" class="btn btn-danger plupload" data-input-id="c-picdesc"
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-picdesc">
                            <i class="fa fa-upload"></i> 上传
                        </button>
                    </span>
                </div>
            </div>
            <span class="msg-box n-right" for="c-picdesc"></span>
            <ul class="row list-inline plupload-preview" id="p-picdesc"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-content" class="control-label col-xs-12 col-sm-2">商品描述:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control summernote" rows="5" name="details[introduce]" cols="50"><p></p></textarea>
        </div>
    </div>

    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">是否推荐:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_recommend]', ['1'=>'是', '2'=>'不是'])}
        </div>
    </div>
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">新品:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_new]', ['1'=>'是', '2'=>'不是'])}
        </div>
    </div>

    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">状态:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>'发布', '2'=>'审核'])}
        </div>
    </div>
    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">排序:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" name="row[sort]" value="50" />
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">确定</button>
            <button type="reset" class="btn btn-default btn-embossed">重置</button>
        </div>
    </div>
</form>
<style>
    .radio label {
        margin-right: 50px;
    }
    .checkbox label {
        margin-right: unset;
    }
    .checkbox {
        width: 45px;
        margin-right: 0;
    }
    dd {
        padding: 0 15px;
    }
</style>
